{include file="public/header" /}

<body class="gray-bg">
    <div class="wrapper wrapper-content">

             <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title"> 
                    </div>
                    <div class="ibox-content">

                        <table class="table table-striped table-bordered table-hover dataTables-example">
                            <thead>
                              <tr class="long-tr">
                                <th class="text-center">用户ID</th>
                                <th class="text-center">操作用户</th>
                                <th class="text-center">描述</th>
                                <th class="text-center">操作IP</th>
                                <th class="text-center">地址</th>
                                <th class="text-center">状态</th>
                                <th class="text-center">操作时间</th>
                                <th class="text-center">操作</th>
                          	  </tr>
                            </thead>
                              <tbody>
                              {volist name='list' id='vo'}
							<tr>
								<td class="text-center">{$vo.u_id}</td>
								<td class="text-center">{$vo.admin_name}</td>
								<td class="text-center">{$vo.text}</td>
								<td class="text-center">{$vo.ip}</td>
								<td class="text-center">地址</td>
								<!--$vo.ipaddr.country，$vo.ipaddr.area-->
								<td class="text-center">{$vo.status}</td>
								<td class="text-center">{$vo.add_time}</td>
								<td class="text-center">
							<a href="javascript:;" onclick="del_rule({$vo.id})" class="btn btn-danger btn-outline btn-xs">
                            <i class="fa fa-trash-o"></i> 删除</a>  
							</td>
							</tr>
							{/volist}
                            </tbody>
                        </table>
                        <div style="text-align: right;">
							{$list->render()}
                		    </div>
                  
							
                    </div>
                </div>
            </div>
        </div>
    </div>
{include file="public/footer" /}

</body>
<script type="text/javascript">
/**
 * [del_rule 删除]
 * @param   {[type]}    id [用户id]
 */
function del_rule(id){
    layer.confirm('确认删除此菜单?', {icon: 3, title:'提示'}, function(index){
        //do something
        $.getJSON('./del_rule', {'id' : id}, function(res){
            if(res.code == 200){
                layer.msg(res.msg,{icon:1,time:1500,shade: 0.1},function(index){
                    window.location.href="{:url('log/index')}";
                });
               
            }else{
                layer.msg(res.msg,{icon:0,time:1500,shade: 0.1});
            }
        });

        layer.close(index);
    })

}
</script>
</html>